import java.util.Random;
import java.util.Scanner;

/**
 * User:langchen
 * Date:2022-07-28
 * Time:9:13
 */
//   math.random  自主学习这个方法生成随机数
public class fivelook {
    public static void main(String[] args) {
        Random rom = new Random();
        int n = rom.nextInt(100);
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要比较的随机数：");
        int num1= sc.nextInt();
        while(true){
            if(n>num1){
                System.out.println("猜大了");
            }
            else if(n<num1){
                System.out.println("猜小了");
            }
            else {
                System.out.println("猜对了");
            }
            break;
        }



/*        Scanner sc= new Scanner(System.in);
        String name = sc.nextLine();
        System.out.println("姓名"+name);
        //结论 当你输入的数据有很多不同类型的时候 优先去处理字符串的输入
        int age = sc.nextInt();
        System.out.println("年龄"+age);
        while(sc.hasNextInt()){
            System.out.println("年龄"+age);
        }
        while(sc.hasNextLine()){
            int tmp = sc.nextInt();
        }
        sc.close();//用完关闭*/





/*        for (int j = 0; j < 100;j++) {

        }
        int i =1;
        while(i<=100){
            if(i % 3 == 0 && i % 5 == 0){
                System.out.println(i);
            }
            i++;
            continue;
        }*/



     /*   int i = 1;
        int ret = 1;
        int j =1;
        int sum =0;
        while(j<=5){
            while(i<=j){
                ret*=i;
                i++;
            }
            sum+=ret;
            j++;
        }
        System.out.println(sum);*/



  /*      int i = 1;
        int sum = 0;
        int sum1 = 0;
        while (i <= 100) {
            if (i % 2 == 0) {
                sum += i;
            } else {
                sum1 += i;
            }
            i++;
        }
        System.out.println("偶数和为" + sum);
        System.out.println("奇数和为" + sum1);*/



    /*    int a = 1;
        switch(a){
            case 1:
                System.out.println("one");
                break;
            case 2:
                System.out.println("two");
                break;
            case 3:
                System.out.println("three");
                break;
            default:
                System.out.println("没有匹配");*/
    }
}
